"""
鼠标悬停
"""
from selenium import webdriver
# 引入ActionChains类
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("http://www.baidu.com")

above = driver.find_element(By.NAME, value="tj_briicon")
# 对定位到的元素执行悬停操作
ActionChains(driver).move_to_element(above).perform()

driver.quit()

